using System;
using System.Collections.Generic;
using System.Text;
using Xeml.Document;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;

namespace Xeml.Visualization
{
    public class VisSwitchDot : VisualTimeElement
    {
    
        private DynamicValueBase[] values;



        public DynamicValueBase[] Values
        {
            get { return values; }
        }


        public string ChangedVariables { get; internal set; }

        public VisSwitchDot(DynamicValueBase[] vals, float x, float y, SizeF size)
        {
            
            this.values = vals;
            this.x = x;
            this.y = y;
            this.Size = size;

        }

        //private GraphicsPath CalcSemiCircle(RectangleF bounds)
        //{
        //    GraphicsPath ret = new GraphicsPath();
        //    ret.AddPie(bounds.X,bounds.Y,bounds.Width,bounds.Height, 180, 180);
        //    return ret;
        //}


        public override TimeSpan Time
        {
            get
            {
                if (this.values.Length > 0)
                {
                    return this.values[0].Time;
                }
                else
                    return TimeSpan.Zero;
            }
            set
            {
                throw new Exception("The method or operation is not implemented.");
            }
        }

        protected override void SetShape()
        {
            this.shape = new GraphicsPath();
            this.shape.AddPie(this.x - (this.size.Width / 2f), this.y - (this.size.Height/2f), this.size.Width, this.size.Height, 180, 180);
        }
    }
}
